package com.hbnu.dao;

import com.hbnu.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface UserMapper {
    @Insert("insert into tb_user(name,password,address,gender,account) values(#{name}, #{password} ,#{address}, #{gender} , #{account}")
    public abstract void addData(User user);

    @Update("update tb_user set account=#{account} where name = #{name}")
//    void updateData(User user);
    void uppdateData(@Param("account") Double account, @Param("name")String name);

    @Delete("delete from tb_user where id =#{id}")
    void deleteData(int id);

    @Select("select * from tb_user where id = #{id}")
    User findById(int id);

    List<User> findAll();

    void updateData(double v, String chaijin);

//    @Select("select * from tb_user")
//    List<User> findAll();
}
